using PDUConverter;

namespace Communication
{
    /// <summary>
    /// Represents a short message from the phone in its decoded state.
    /// </summary>
    public class DecodedShortMessage
    {
        /// <summary>
        /// Initializes a new instance of the ShortMessageFromPhone.
        /// </summary>
        /// <param name="index">The index where the message is saved in the device in the DecodedShortMessage.storage.</param>
        /// <param name="data">The decoded message.</param>
        /// <param name="status">The parsed message status.</param>
        /// <param name="storage">The phone storage the message was read from.</param>
        public DecodedShortMessage(int index, SmsPdu data, PhoneMessageStatus status, string storage)
        {
            Index = index;
            Data = data;
            Status = status;
            Storage = storage;
        }

        /// <summary>
        /// Gets the decoded message.
        /// </summary>
        public SmsPdu Data { get; private set; }

        /// <summary>
        /// Gets the index where the message is saved in the device in the DecodedShortMessage.Storage.
        /// </summary>
        public int Index { get; private set; }

        /// <summary>
        /// Gets the parsed message status.
        /// </summary>
        public PhoneMessageStatus Status { get; private set; }

        /// <summary>
        /// Gets the phone storage the message was read from.
        /// </summary>
        public string Storage { get; private set; }
    }
}